package top.zywork.security;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

import java.util.Collection;
import java.util.Date;

/**
 * 保存用户信息，在jwt token中以JSON字符串存储此用户信息<br/>
 *
 * 创建于2018-09-12<br/>
 *
 * @author 王振宇
 * @version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class JwtClaims {

    private Long userId;
    private String username;
    private Collection<SimpleGrantedAuthority> authorities;
    private Boolean enabled;
    private Boolean nonLocked;
    private Boolean nonExpired;
    private Date createDate;
    private Long accessTokenExpiration;

}
